package Demo1;
import java.sql.*;

public class SexCount {
    public static void main(String[] args) {
        DbUtil db =new DbUtil();
        db.load();
        db.sexCount();
        /*try {
            Class.forName("com.mysql.jdbc.Driver");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        String url ="jdbc:mysql://localhost:3306/kgc76?useSSL=false";
        Connection conn =null;
        PreparedStatement ps =null;
        ResultSet rs =null;
        try {
            conn= DriverManager.getConnection(url,"root","123456");
            String sql ="select sex,count(1) as 'renshu' from s_student GROUP BY sex";
            ps= conn.prepareStatement(sql);
            rs = ps.executeQuery();
            while (rs.next()){

            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
        finally {
            try {
                rs.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
            try {
                ps.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }*/
    }
}
